﻿Imports System.Data.OleDb
Public Class AddVideos
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Btn_Video_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Btn_Video.Click
        Dim Videosql As String = "INSERT INTO Videos (VideoID,VideoTitle,VideoDesc) VALUES (@f1,@f2,@f3)"

        Dim Videoconn As OleDbConnection = New OleDbConnection(ConfigurationManager.ConnectionStrings("CoinsConn").ConnectionString)
        Videoconn.Open()


        Dim Videocmd As OleDbCommand = New OleDbCommand(Videosql, Videoconn)


        Videocmd.Parameters.AddWithValue("@f1", TB_VideoID.Text)
        Videocmd.Parameters.AddWithValue("@f2", TB_VideoTitle.Text)
        Videocmd.Parameters.AddWithValue("@f3", TB_VideoDesc.Text)

       

        Videocmd.ExecuteNonQuery()
        Videoconn.Close()
        Videocmd.Dispose()
        Videoconn.Dispose()

        Response.Redirect("VideoConfirmation.aspx")
    End Sub

    Protected Sub Btn_watch_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Btn_watch.Click
        Response.Redirect("VideoGallery.aspx")
    End Sub
End Class